/**
 * Created by hxsd on 2016/7/22.
 */



var inter = setInterval("countDown()",1000);
var t = 5;
function countDown(){
    var time = document.getElementById("time");
    t--;
    time.innerHTML=t;

    if (t<=0) {
        location.href="index.html";
        clearInterval(inter);
    }
}

window.onload=countDown;
